package cn.tsinghua.comsmacitccntsinghua.VO.status;

import cn.tsinghua.comsmacitccntsinghua.tsinterface.BinStatus;

/**
 * @Author yjl
 * @create 2021/9/24 9:37
 */

//status具体实现类
public class Status implements BinStatus {
    //正
    public static final String normal_not_full = "00";//未满
    public static final String normal_full = "001";  //已满
    public static final String normal_normal = "01";//从故障/异常中恢复
    public static final String normal_cannot_oepn = "02";
    //异常
    public static final String warn_full = "10";
    public static final String warn_over_weight = "11";
    public static final String warn_over_temperature = "12";
    public static final String warn_clean = "13";
    public static final String warn_check = "14";
    public static final String warn_smoke = "15";
    //故障
    public static final String error_communication_no_response = "20";
    public static final String error_mortor_no_current = "210";
    public static final String error_mortor_short_circuit = "211";
    public static final String error_weight_e = "22";
    public static final String error_distance_e = "23";
    public static final int NORMAL = 0;
    public static final int WARN = 1;
    public static final int ERROR = 2;
    public static final int FULL = 3;//溢满
    public static final int CANOTOPEN = 4;//不给开

    int type;// 0/1/2

    //正常 0 启用 1 故障2异常2
    int weight;

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    /**
     * 0正常 1异常 2故障
     * 0正常 00未满 01已满 02正常 (恢复)
     * 10溢满 11超重 12超温 13清理 14 巡检结束 15烟雾报警
     * 20通讯故障 21电机故障 210无电流 211短路 22称重故障 23测距故障
     */
    String status = "00";//状态 默认00 ->异常/故障/正常

    @Override
    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Override
    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String getStatus() {
        return status;
    }

    public Status(int type, String status) {
        this.type = type;
        this.status = status;
    }

    public Status() {

    }
}
